package test;

import java.util.Scanner;

public class TryError {

    public TryError() {
    }

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个被除数：");
        
		String a[] = new String[4];
		/*
		 * for (int i = 0; i < a.length; i++) { a[i] = scanner.next(); }
		 */
		
		  for(int i=0;i<a.length;i++){ //读取数字放入数组的第i个元素 
			  a[i]=scanner.next();
			  
		  }
		 
        int num1, num2;

        try {
            num1 = Integer.parseInt(a[2]);
            num2 = Integer.parseInt(a[3]);
            System.out.println(num1 / num2);
        } catch (NumberFormatException | ArithmeticException e) {
            e.printStackTrace();
        }catch (ArrayIndexOutOfBoundsException e) {
        	e.printStackTrace();
		}
        finally {
            System.out.println("总是被执行");
        }
    }
}
